{%- if grains['os'] == 'Ubuntu' -%}
{%- set repo_url = salt['pillar.get']('default:OMV_APT_SECURITY_REPOSITORY_URL', 'http://security.ubuntu.com/ubuntu') -%}
deb {{ repo_url }} {{ grains['oscodename'] }}-security main restricted universe
deb-src {{ repo_url }} {{ grains['oscodename'] }}-security main restricted universe
{%- else -%}
{%- set repo_url = salt['pillar.get']('default:OMV_APT_SECURITY_REPOSITORY_URL', 'http://security.debian.org/debian-security') -%}
{%- set signed_by_keyfile = salt['pillar.get']('default:OMV_APT_SECURITY_REPOSITORY_SIGNED_BY_KEYFILE', '/usr/share/keyrings/debian-archive-' ~ grains['oscodename'] ~ '-security-automatic.gpg') -%}
deb {% if signed_by_keyfile | length > 0 %}[signed-by={{ signed_by_keyfile }}]{% endif %} {{ repo_url }} {{ grains['oscodename'] }}-security main contrib non-free non-free-firmware
deb-src {% if signed_by_keyfile | length > 0 %}[signed-by={{ signed_by_keyfile }}]{% endif %} {{ repo_url }} {{ grains['oscodename'] }}-security main contrib non-free non-free-firmware
{%- endif %}
